﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Iacym.Entities;

namespace Iacym.Repository.Mapping
{
    public class SEXOMap:EntityTypeConfiguration<SEXO>
    {
        public SEXOMap()
        {
            this.HasKey(t=>t.Id);

            this.Property(t => t.Id)
                .IsRequired()
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.Descripcion)
                .IsRequired()
                .HasMaxLength(15);

            this.ToTable("SEXO");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
        }
        
    }
}
